package com.ztgf.commodity.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.ztgf.commodity.models.dto.CommoditySpecificationCategoryRelationDTO;
import com.ztgf.commodity.models.vo.CommodityAttrPriceVO;
import com.ztgf.commodity.models.vo.CommodityAttrVO;
import com.ztgf.commodity.models.vo.SpecificationCategoryVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 分类规格关系表映射
 *
 * @author chenyu.wang
 * @Date 2020-05-27 11:05:46
 */
@Mapper
public interface CommoditySpecificationCategoryRelationMapper extends BaseMapper<CommoditySpecificationCategoryRelationDTO> {

    /**
     * description: 根据分类id，查询关联规格信息，用于上传商品位置
     * param: [id]
     * author: chenyu.wang
     * date: 2020-06-03
     * return: java.util.List<com.ztgf.commodity.models.vo.SpecificationCategoryVO>
     */
    List<SpecificationCategoryVO> getSpecificationCategory(@Param("id") Long id, @Param("brandId") Long brandId, @Param("filterName") String filterName);

    /**
     * description: 根据规格id，查询规格属性
     * param: [id] 规格id
     * author: chenyu.wang
     * date: 2020-06-08
     * return: java.util.List<com.ztgf.commodity.models.vo.CommodityAttrVO>
     */
    List<CommodityAttrVO> getAttrList(@Param("id") Long id);

}
